<!DOCTYPE html>
<html>
<head>
	<title></title>
	<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
	<script src="https://cdn.bootcss.com/jquery.form/4.2.2/jquery.form.min.js"></script>

</head>
<body>

<form id='haha' action="http://localhost:8080/loop/form2" method="post">
	<input type="text" name="a">
	<input type="text" name="b">
  <input type="file" name="c">
	<input type='submit' value="submit" />
</form>
<script>
  function showResponse(responseText, statusText, xhr, $form){
  	alert(responseText);
  }
  // 使用ajaxForm
  $(function(){
  	var options = {
        success: showResponse  // post-submit callback
    };

   $("#haha").ajaxForm(options);
  });
</script>
</body>
</html>